/**
 * Copyright (c) 2017,安徽皖通科技股份有限公司 All rights reserved.
 * @data:2017年10月10日
 * @author:MaShibo
 */
package com.wttech.dzzf.process.model.user;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import com.wtkj.dao.annotation.DatabaseTable;
import com.wtkj.vo.AbstractValueObject;

import cn.com.taiji.sdk.model.comm.protocol.annotation.EnumValidate;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 用户卡信息
 * 
 * @date 2017年10月10日
 * @author MaShibo
 */
@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper = false)
@ToString
@DatabaseTable(tableName = "BS_CARD")
public class Card extends AbstractValueObject {
    
    
    @Size(max = 20, message = "id最大长度为20为字符")
    @NotNull(message = "id必填")
    private String id;
    
    @EnumValidate(message = "cardType不正确", regexp = "(111|112|113|121|122|123|131|132|133|141|142|143|151|152|153|211|212|213|221|222|223|231|232|233|241|242|243|251|252|253)")
    @NotNull(message = "cardType必填")
    private Integer cardType;
    
    @EnumValidate(message = "brand不正确", regexp = "(1|2|3|4|5|6|7|8|9|10|11|12)")
    @NotNull(message = "brand必填")
    private Integer brand;
    
    @Size(max = 100, message = "model最大长度为100为字符")
    private String model;
    
    @Size(min = 11, max = 11, message = "agencyId为11位数字字符")
    @NotNull(message = "agencyId必填")
    private String agencyId;
    
    @Size(min = 17, max = 17, message = "userId为17位数字字符")
    @NotNull(message = "userId必填")
    private String userId;
    
    @Pattern(message = "vehicleId不正确", regexp = "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}_[0-9]$")
    @Size(max = 17, message = "vehicleId最大长度为17为字符")
    @NotNull(message = "vehicleId必填")
    private String vehicleId;
    
    @Size(max = 20, message = "enableTime最大长度为20为字符")
    @NotNull(message = "enableTime必填")
    private String enableTime;
    
    @Size(max = 20, message = "expireTime最大长度为20为字符")
    @NotNull(message = "expireTime必填")
    private String expireTime;
    
    @EnumValidate(message = "issuedType不正确", regexp = "(1|2)")
    @NotNull(message = "issuedType必填")
    private Integer issuedType;
    
    @Size(max = 20, message = "channelId最大长度为20为字符")
    @NotNull(message = "channelId必填")
    private String channelId;
    
    @Size(max = 20, message = "issuedTime最大长度为20为字符")
    @NotNull(message = "issuedTime必填")
    private String issuedTime;
    
    @NotNull(message = "status必填")
    @EnumValidate(message = "status不正确", regexp = "(1|2|3|4|5|6)")
    private Integer status;
    
    @Size(max = 20, message = "statusChangeTime最大长度为20为字符")
    @NotNull(message = "statusChangeTime必填")
    private String statusChangeTime;
    
    @EnumValidate(message = "operation不正确", regexp = "(1|2|3)")
    @NotNull(message = "operation 必填")
    private Integer operation = 1;
}
